package top.chj.day18.genericity.上下限2;

/**
 * @Auther:小陈的Java
 * 通配符？
 */
public class Demo2<T> {
    private int id;
    private T t;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    public static void main(String[] args) {
        Demo2<?> demo2 = new Demo2<String>();
        System.out.println(demo2.getT());
        demo2.setT(null);//只能是null
    }
}